<template>
  <div>
      111
  </div>
</template>

<script>
export default {
data(){
    return {
        brocastInfo:{
            bigTravrl:{
                brocastModel:'audio',
                audioUrls:[''],
            },
            idle:{
                brocastModel:'system',
                audioUrls:[],
            },
            tmpreture:{
                normal:{
                    brocastModel:'audio',
                    audioUrls:[],
                },
                switchFlag:true,
                abnormal:{
                    brocastModel:'system',
                    audioUrls:[],
                }
            },
            healthCode:{
                switchFlag:true,
                h24:{
                    brocastModel:'system',
                    audioUrls:[],
                },
                h48:{
                    brocastModel:'system',
                    audioUrls:[],
                },
                h72:{
                    brocastModel:'system',
                    audioUrls:[],
                },
                negtive:{
                    brocastModel:'system',
                    audioUrls:[],
                },
            },
            nucets:{
                switchFlag:true,
                first:{
                    brocastModel:'system',
                    audioUrls:[],
                },
                secend:{
                    brocastModel:'system',
                    audioUrls:[],
                },
                third:{
                    brocastModel:'system',
                    audioUrls:[],
                }
            }
        }
    }
},
created(){
    this.check()
},
methods:{
    check(){
        for (const key in this.brocastInfo) {
            if (key == 'bigTravrl' || key =='idle') {
                console.log(this.brocastInfo[key],'-----',key);
                if (this.brocastInfo[key].brocastModel == 'audio' && this.brocastInfo[key].audioUrls.length == 0) {
                            console.log('失败了');
                            this.$message('失败了')
                            return
                        }
            }else{
                for (const k in this.brocastInfo[key]) {
                    console.log(this.brocastInfo[key][k],'------',key,'-',k);
                    if (this.brocastInfo[key][k].brocastModel !=undefined) {
                        if (this.brocastInfo[key][k].brocastModel == 'audio' && this.brocastInfo[key][k].audioUrls.length == 0) {
                            console.log('失败了');
                            this.$message('失败了')
                            return
                        }
                    }
                }
            }
        }
    }
}
}
</script>

<style>

</style>